package cn.wolfcode.service.impl;

import cn.wolfcode.mapper.BusinessReportMapper;
import cn.wolfcode.qo.BusinessReportQueryObject;
import cn.wolfcode.qo.QueryObject;
import cn.wolfcode.service.IBusinessReportService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.ModelAttribute;

import java.util.HashMap;
import java.util.List;
@Service
public class BusinessReportServiceImpl implements IBusinessReportService {
    @Autowired
    private BusinessReportMapper businessReportMapper;

    @Override
    public PageInfo<HashMap> report(QueryObject qo) {
        PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize());
        List<HashMap> list = businessReportMapper.report(qo);
        return new PageInfo<>(list);
    }
}
